<%@ page import="java.sql.*,studentportal.*"%>
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>

<body background="indtextb.jpg" bgcolor="#FFFFFF" text="#000000" link="#3366CC" vlink="#666666" alink="#996600">

<table border="0" width="100%" bordercolorlight="#666666" bordercolordark="#000000">
  <tr>
    <td width="100%"><img border="0" src="StdPrtlbanner.jpg" width="846" height="65"><!--mstheme--><font face="Trebuchet MS, Arial, Helvetica">&nbsp;<!--mstheme--></font></td>
  </tr>
</table>
<%


			String sid[]=request.getParameterValues("sid");
			String sname[]=request.getParameterValues("sname");
			String sub1[]=request.getParameterValues("sub1");
			String sub2[]=request.getParameterValues("sub2");
			String sub3[]=request.getParameterValues("sub3");
			String sub4[]=request.getParameterValues("sub4");
			String sub5[]=request.getParameterValues("sub5");

			Connection con=MySQLDriver.getConnection();
			Statement st=con.createStatement();
			String ssid=null;
			String ssname=null;
			int sub11=0,sub22=0,sub33=0,sub44=0,sub55=0;
			
			for(int i1=0;i1<sid.length;i1++)
			{
				ssid=sid[i1];
				ssname=sname[i1];
				sub11=Integer.parseInt(sub1[i1]);
				sub22=Integer.parseInt(sub2[i1]);
				sub33=Integer.parseInt(sub3[i1]);
				sub44=Integer.parseInt(sub4[i1]);
				sub55=Integer.parseInt(sub5[i1]);

				String qry="insert into student_marks values('"+ssid+"','"+ssname+"',"+sub11+","+sub22+","+sub33+","+sub44+","+sub55+")";
				System.out.println(qry);
				st.addBatch(qry);
			}
			int j1[]=st.executeBatch();
			
			if(j1.length>0)
			{
						RequestDispatcher rd=request.getRequestDispatcher("/FacMInsertSuc.jsp");
						rd.forward(request,response);
			}
			else
			{
									RequestDispatcher rd=request.getRequestDispatcher("/FacultyMarkStore.html");
									rd.include(request,response);
									out.println("<p><font color=\"#FF0000\">* Operation is Faild<br>* This is For Only HOD</font></p>");
			}
%>
<table border="0" width="100%">
  <tr>
     <td width="20%">
      <p align="center"><font face="Trebuchet MS, Arial, Helvetica">
	  <a href="FacultyMarkCheck.jsp"><b>Faculty Marks Entry</b></a></font></td>
    
    <td width="20%">
      <p align="center"><a href="Home.html"><b>Home</b></a></td>
  </tr>
</table>
</body>
</html>
